/*************************************************************************
	> File Name: oj-214_first_k_avg.c
	> Author: Wang Bo
	> Mail: 1276106221@qq.com
	> Created Time: 2020年10月27日 星期二 13时56分44秒
 ************************************************************************/

#include <stdio.h>
#include <stdlib.h>

int main() {
    int n, k, m, score[701] = {0}, avg = 0;
    scanf("%d", &n);
    for (int i = 0; i < n; ++i) {
        scanf("%d", &m);
        score[m]++;
    }
    scanf("%d", &k);
    int cnt = k;
    for (int i = 700; cnt > 0; --i) {
        if (score[i]) {
            cnt -= score[i];
            avg += score[i] * i;
        }
    }
    printf("%.2f", (float)avg / k);
    return 0;
}
